{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1m\u001b[31m 1- Change the world🌍 by being yourself - Amy Poehler\u001b[0m\n",
      "\u001b[31m 2- Never regret anything that made you smile 🙂 - Mark Twain\u001b[0m\n",
      "\u001b[4m\u001b[1m\u001b[35m 3- Every moment is a fresh beginning - T.S Eliot©\u001b[0m\n",
      "\u001b[5m 4- Die with memories, not dreams - Unknown®\u001b[0m\n",
      "\u001b[1m\u001b[33m 6- Everything you can imagine is real - Pablo Picasso🚀\u001b[0m\n",
      "\u001b[1m\u001b[34m 7- Simplicity is the ultimate sophistication - Leonardo da Vinci💡\u001b[0m\n",
      "\u001b[1m\u001b[30m\u001b[41m 8- Whatever you do, do it well - 🌈Walt Disney\u001b[0m\n",
      "\u001b[7m\u001b[1m\u001b[36m 9- What we think, we become - Buddha 🎯\u001b[0m\n",
      "\u001b[2m\u001b[1m\u001b[37m10- All limitations are self-imposed ✨ Oliver Wendell Holmes\u001b[0m\n",
      "\u001b[1m11- When words fail, music speaks - Shakespeare 📌\u001b[0m\n",
      "\u001b[2m\u001b[1m\u001b[36m12- If you tell the truth you dont have to remember anything - Mark Twain\u001b[0m\n",
      "\u001b[1m\u001b[34m**********************\n",
      "* 299792.48 km/s  ⚡ *\n",
      "**********************\u001b[0m\n",
      "\u001b[7m\u001b[1m\u001b[32mAny string True 455.5 <class 'vtkRenderingCorePython.vtkActor'>\u001b[0m\n",
      "\u001b[1m\u001b[32mthis is true\u001b[0m\n",
      "\u001b[1m\u001b[31mthis is false\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "###################################\n",
    "# How to use the printc() function.\n",
    "###################################\n",
    "# Available colors:\n",
    "#  0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white\n",
    "#\n",
    "# Available modifiers:\n",
    "#  c (foreground color), bc (background color), hidden, bold, blink, underLine, dim, invert, box\n",
    "\n",
    "from vtkplotter import printc, printHistogram\n",
    "\n",
    "printc(\" 1- Change the world~world by being yourself - Amy Poehler\", c=1)\n",
    "printc(\" 2- Never regret anything that made you smile ~smile - Mark Twain\", c=\"r\", bold=0)\n",
    "printc(\" 3- Every moment is a fresh beginning - T.S Eliot~copyright\", c=\"m\", underline=1)\n",
    "printc(\" 4- Die with memories, not dreams - Unknown~registered\", blink=1, bold=0)\n",
    "printc(\" 6- Everything you can imagine is real - Pablo Picasso~rocket\", c=3)\n",
    "printc(\" 7- Simplicity is the ultimate sophistication - Leonardo da Vinci~idea\", c=4)\n",
    "printc(\" 8- Whatever you do, do it well - ~rainbowWalt Disney\", c='k', bc=1)\n",
    "printc(\" 9- What we think, we become - Buddha ~target\", c=6, invert=1)\n",
    "printc(\"10- All limitations are self-imposed ~sparks Oliver Wendell Holmes\", c=7, dim=1)\n",
    "printc(\"11- When words fail, music speaks - Shakespeare ~pin\")\n",
    "printc(\"12- If you tell the truth you dont have to remember anything\", \"-\", \"Mark Twain\", c=6, dim=1)\n",
    "\n",
    "printc(299792.48, \"km/s  ~lightning\", c=4, box=\"*\")\n",
    "\n",
    "import vtk\n",
    "printc(\"Any string\", True, 455.5, vtk.vtkActor, c=\"green\", invert=True)\n",
    "printc(\"this is true\",  c=True)\n",
    "printc(\"this is false\", c=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Symbol \tEncoding\n",
      "⁉ \t~!?\n",
      "Δ \t~Delta\n",
      "Γ \t~Gamma\n",
      "Λ \t~Lambda\n",
      "Ω \t~Omega\n",
      "Π \t~Pi\n",
      "Σ \t~Sigma\n",
      "α \t~alpha\n",
      "β \t~beta\n",
      "⭐ \t~bigstar\n",
      "⏹ \t~block\n",
      "🔷 \t~bluesquare\n",
      "💥 \t~bomb\n",
      "📸 \t~camera\n",
      "✅ \t~checked\n",
      "χ \t~chi\n",
      "∮ \t~cinteg\n",
      "🚧 \t~construction\n",
      "© \t~copyright\n",
      "δ \t~delta\n",
      "💎 \t~diamomd\n",
      "➗ \t~division\n",
      "🧬 \t~dna\n",
      "⬇ \t~downarrow\n",
      "ε \t~epsilon\n",
      "η \t~eta\n",
      "🏁 \t~flag\n",
      "γ \t~gamma\n",
      "⏳ \t~hourglass\n",
      "💡 \t~idea\n",
      "∫ \t~integral\n",
      "κ \t~kappa\n",
      "λ \t~lambda\n",
      "⬅ \t~leftarrow\n",
      "⚡ \t~lightning\n",
      "➖ \t~minus\n",
      "μ \t~mu\n",
      "⛔ \t~noentry\n",
      "ν \t~nu\n",
      "ω \t~omega\n",
      "🔸 \t~orangesquare\n",
      "φ \t~phi\n",
      "π \t~pi\n",
      "📌 \t~pin\n",
      "➕ \t~plus\n",
      "🚫 \t~prohibited\n",
      "ψ \t~psi\n",
      "🌈 \t~rainbow\n",
      "🔺 \t~redtriangle\n",
      "® \t~registered\n",
      "ρ \t~rho\n",
      "➡ \t~rightarrow\n",
      "🚀 \t~rocket\n",
      "😒 \t~sad\n",
      "💾 \t~save\n",
      "σ \t~sigma\n",
      "✳ \t~smallstar\n",
      "🙂 \t~smile\n",
      "✨ \t~sparks\n",
      "🎯 \t~target\n",
      "τ \t~tau\n",
      "θ \t~theta\n",
      "👍 \t~thumbup\n",
      "❌ \t~times\n",
      "™ \t~trademark\n",
      "⬆ \t~uparrow\n",
      "📽  \t~video\n",
      "🌍 \t~world\n",
      "ξ \t~xi\n",
      "💤 \t~zzz\n"
     ]
    }
   ],
   "source": [
    "## print special characters\n",
    "from vtkplotter.colors import emoji\n",
    "print('Symbol', '\\tEncoding')\n",
    "for k in sorted(emoji.keys()):\n",
    "    print(emoji[k] + \" \\t\" + k) #normal print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[34m(logscale) my scalars\t(entries=1000)\n",
      "2.17        ▉            \n",
      "   |       ▉▉▉▉▉▉        \n",
      "   |      ▉▉▉▉▉▉▉▉       \n",
      "   |    ▉ ▉▉▉▉▉▉▉▉▉      \n",
      "   |    ▉▉▉▉▉▉▉▉▉▉▉▉     \n",
      "   |   ▉▉▉▉▉▉▉▉▉▉▉▉▉     \n",
      "   |  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉    \n",
      "   | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉   \n",
      "   | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉  \n",
      "   | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉\n",
      "-2.92....................3.64\n",
      "\u001b[0m\n",
      "\u001b[1m\u001b[31mHistogram\t(entries=1000)\n",
      "                           249\n",
      "-2.92| \n",
      "-2.26| ▆▆▆▆\n",
      "-1.60| ▆▆▆▆▆▆▆\n",
      "-0.95| ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆\n",
      "-0.29| ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆\n",
      "0.36 | ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆\n",
      "1.02 | ▆▆▆▆▆▆▆▆\n",
      "1.67 | ▆▆\n",
      "2.33 | \n",
      "2.98 | \n",
      "\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "## Print histograms\n",
    "import numpy as np\n",
    "data = np.random.normal(size=1000)\n",
    "printHistogram(data, c='blue', bold=False, logscale=True, title='my scalars');\n",
    "printHistogram(data, c=1, horizontal=1);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
